home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
AGSDOS0!.ZIP
/
ADOS.PPS
< prev
next >
Wrap
Text File
|
1994-10-01
|
4KB
|
193 lines
string dirname
string k
string backcommand
string command
string work
integer a
integer slashcount
fappend 1, PPEPath()+ "A-DOS.LOG", O_RW, S_DN
fputln 1, "------------------------------------------------------------------------------"
fputln 1, string(Date()), " ", string(Time()), " ", U_Name(), " entered in A-DOS :))"
fputln 1
fputln 1, "Command used :"
fputln 1
Startdisp FNS
dirname = "PCB"
color @X07
cls
delay 20
dispfile ppepath()+"shell.txt",DEFS
delay 25
dispfile ppepath()+"limiter.txt",DEFS
delay 10
dispfile ppepath()+"access.txt",DEFS
delay 18
dispfile PPEPath()+"allowed.tre",0
gosub showprompt
:tkt
k = inkey()
:te
if (k = "") goto tkt
if (asc(k) >= 32 && len(k) = 1) then
print k
command = command + k
end if
if (((k = chr(8) && len(k) = 1) || (k = "LEFT")) && len(command)>0 ) then
print chr(8)+" "+chr(8)
command = left(command,len(command)-1)
end if
if (k == "RIGHT" && len(backcommand) > len(command)) then
k = mid(backcommand,len(command)+1,1)
goto te
end if
if (k = chr(13) && len(k) = 1) then
goto commandentered
end if
goto tkt
:commandentered
command = trim(command," ")
backcommand = command
command = upper(command)
slashcount = 0
for a = 1 to len(command)
if (mid(command,a,1) = "\") inc slashcount
next
if (slashcount > 1) then
dispfile ppepath()+"nocomplx.txt",defs
command = ""
gosub showprompt
goto tkt
end if
if (left(command,3) = "DIR") then
fputln 1, command
if (dirname != "") then
dispfile PPEPath()+dirname+".DIR",0
else
dispfile PPEPath()+"ROOT.DIR",0
end if
command = ""
gosub showprompt
goto tkt
end if
if (left(command,3) = "REM") then
command = ""
gosub showprompt
goto tkt
end if
if (command = "CD\") then
dirname = ""
command = ""
gosub showprompt
goto tkt
end if
if (left(command,3) = "CD\") then
dispfile ppepath()+"nocomplx.txt",defs
command = ""
gosub showprompt
goto tkt
end if
if (left(command,4) = "CD..") then
fputln 1, command
if (dirname = "") then
dispfile ppepath()+"invaldir.txt",defs
command = ""
gosub showprompt
goto tkt
else
dirname = ""
command = ""
gosub showprompt
goto tkt
end if
end if
if (command = "CLS") then
fputln 1, command
command = ""
cls
gosub showprompt
goto tkt
end if
if (left(command,3) = "CD ") then
fputln 1, command
work = upper(mid(command,4,len(command)-3))
if ((work = ".." && dirname != "")|| work = "\") then
dirname = ""
command = ""
gosub showprompt
goto tkt
end if
if (work != "PCB" && work != "DOS") then
dispfile ppepath()+"a_denied.txt",defs
command = ""
gosub showprompt
goto tkt
else
dirname = work
command = ""
gosub showprompt
goto tkt
end if
end if
if (left(command,7) == "FORMAT " \
|| left(command,4) == "DEL "\
|| left(command,8) == "DELTREE "\
|| left(command,6) == "ERASE "\
|| left(command,5) == "FDISK"\
|| left(command,3) == "RD "\
) then
fputln 1, command, " !!!!!"
dispfile PPEPath()+ "BUSTED", GRAPH
fputln 1, "User was thrown out of this PPE and should be Locked out !!"
log "Unallowed command typed in A-DOS !!!",0
message 0, "Sysop", U_name(), "Lamer", "R", 0, 0, 0, ppepath()+"busted.msg"
wait
goto v_end
end if
if (command = "EXIT") then
println
delay 20
fputln 1, "Exit by normal way..."
goto v_end
end if
if (command = "") goto pmpt
FOpen 2,PPEPath()+dirname+".CMD",O_RD,S_DN
while (!Ferr(2)) do
FGet 2, work
if (upper(work) = command) then
fputln 1, command
dispfile ppepath()+"a_denied.txt",defs
fclose 2
goto pmpt
end if
end while
fputln 1, command
dispfile ppepath()+"invalcom.txt",defs
fclose 2
goto pmpt
:pmpt
gosub showprompt
command = ""
goto tkt
:v_end
fclose 1
end
:showprompt
println
println "Type EXIT to return to PCBoard"
println
print "C:\", dirname, ">"
return